use axum::{
    middleware, Router
};

mod account;
mod dict;
// mod opencv;
mod manage;

pub fn routes() -> Router {
    Router::new()
    .nest("/user",account::user::auth_routes())
    .nest("/menu",crate::_pub::pc::menu::auth_routes())
    .nest("/dict",dict::auth_routes())
    // .nest("/opencv",opencv::auth_routes())
    .merge(manage::routes())
	.merge(super::upload::auth_routes())
    .route_layer(middleware::from_fn(com::auth::user_redis::auth))
    .nest("/user",account::user::auth_no_routes())
}